package com.test.spring.demo5;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {
    public static void main(String[] args) {

        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");


        Father father= (Father) applicationContext.getBean("father");
        father.getSon().test();
        System.out.println(father.getWife().getName());

    }
}
